package com.wn.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yellow Docter
 * @date 2023 -03-10
 * @desc
 */
@RestController
@RequestMapping("/member")
public class MemberController {

    @GetMapping("/find/{id}")
    public String findMemberById(@PathVariable Integer id) throws Exception {

        if (4 == id){
            throw  new Exception("手动抛出异常....");
        }

        return "member" + id;
    }
}
